package dl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import pojo.User;
/**
 * 
 * @author ASUS
 *    读取配置文件，通过getBean获取对象
 */
public class Mytext {
	public static void main(String[] args) {
		ApplicationContext ac=new ClassPathXmlApplicationContext("application.xml");
		User user = (User) ac.getBean("user");
		User user1 = (User) ac.getBean("user");
		System.out.println(user);
		System.out.println(user.hashCode());
		System.out.println(user1.hashCode());
	}

}
